/**
 *
 */
package com.angel.mocks.data.generator.dataGenerator;

import java.util.Collection;

import org.apache.commons.lang.RandomStringUtils;

import com.angel.dao.generic.factory.DAOFactory;
import com.angel.dao.generic.interfaces.GenericDAO;
import com.angel.data.generator.interfaces.DataGenerator;
import com.angel.mocks.data.generator.daos.impl.UserTypeHibernateDAO;
import com.angel.mocks.data.generator.domainObject.UserType;

/**
 * @author William
 *
 */
public class UserTypeDataGenerator implements DataGenerator{


	private static final long serialVersionUID = -6660041377354830324L;

	public void generateData(Collection<Object> dataCollection, DAOFactory daoFactory) {
		UserType developer = new UserType();
		developer.setDescription(RandomStringUtils.randomAlphabetic(10));
		developer.setName(RandomStringUtils.randomAlphabetic(10));
		dataCollection.add(developer);

		UserType admin = new UserType();
		admin.setDescription(RandomStringUtils.randomAlphabetic(8));
		admin.setName(RandomStringUtils.randomAlphabetic(7));
		dataCollection.add(admin);
	}

	@SuppressWarnings("unchecked")
	public Class<? extends DataGenerator>[] getDependecesGenerators() {
		return null;
	}

	@SuppressWarnings("unchecked")
	public GenericDAO getGenericDAO() {
		return new UserTypeHibernateDAO();
	}

	public Class<? extends Object> getDataGeneratorClass() {
		return UserType.class;
	}

	public Class<?> thisDataGeneratorClass() {
		return this.getClass();
	}
}
